import request from "@/utils/requestapi";

enum API {
    C2_URL = "https://graph.facebook.com",
}

//三级分类的接口 

export const reqFbtoken = (code: any,url:any) =>
    request.get<any, any>(API.C2_URL +`/oauth/access_token?client_id=1026488082455623&state=testuser&client_secret=7a644e8b9ecd8c939078f40881e4e552&redirect_uri=${url}&code=${code}`+'#_=_');
export const reqBmid = (token:any)=>request.get<any,any>(API.C2_URL + `/v20.0/me?fields=id,name&access_token=${token}`)
export const reqBm = (bmid:any,token:any)=>request.get<any,any>(API.C2_URL + `/v20.0/${bmid}/adaccounts?access_token=${token}&fields=id,name,timezone_id,currency,end_advertiser,account_id,account_status&limit=500`)
export const reqPublic = (bmid:any,token:any)=>request.get<any,any>(API.C2_URL + `/v20.0/${bmid}/accounts?access_token=${token}&fields=id,name,category,tasks,about,picture`)